JS Engine

What do we know/heard about JS Engine?

Let's talk about what this engine, we are mentioning.

If I give a plain JS file to a Computer, It can not read or interpret the language. The CPU only understands the 0's and 1's.

To fill this communication gap, we need a translator or interpreter. This is the position the V8 Engine come to play.

This magical engine read our code and interpret it to the CPU.

ECMA-Script Engine

Before 2008, most browser use very basic engines. When V8 came up, it was a significant pivotal time of JS.

V8 was released by Google. While they were developing the Map application, it requires a powerful engine compare to traditional available JS engine.

Inside V8 Engine

Interpreter

Compiler

Interpreter Vs Compiler

JIT Compiler

Stands for Just In Time compiler.

Both the interpreter and compiler has its pro and cons.

Some engineers from google came up with the goodies of them and created the JIT Compiler

V8 and JIT Compiler

In V8, the code is translated to Byte Code by Interpreter. The V8 is intelligent enough to determine if there is an optimization is required. In this case the V8 engine brings the JIT Compiler.

Is Javascript interpreted language?

It depends on the implementation.

Initially JS was the interpreted language. Now with V8 it's the Compiled language.

Same goes for the Python. It could be both, interpreted or compiled.